package com.hxzy.shop.common.dto.auth.req;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 功能描述：添加账户
 *
 * @author tonneyyy
 */
@Getter
@Setter
@ToString
public class AddAccountReq {

    @ApiModelProperty("姓名")
    @NotBlank(message = "姓名不能为空")
    private String name;

    @ApiModelProperty("电话")
    @NotBlank(message = "电话不能为空")
    @Pattern(regexp = "^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}$", message = "手机号校验错误")
    private String phone;

    @ApiModelProperty("账号")
    @NotBlank(message = "账号不能为空")
    private String account;

    @ApiModelProperty("密码")
    @NotBlank(message = "密码不能为空")
    private String password;

    @ApiModelProperty("头像")
    private String avatar;

    @ApiModelProperty("角色Id")
    private Long roleId;

    @ApiModelProperty("sub")
    private String sub;

    @ApiModelProperty("所属门店id")
    private Long storeId;
}
